package com.example.leetcode.graph;

import com.example.leetcode.graph.common.GraphUtils;

import java.util.Arrays;

class Solution210 {
    public int[] findOrder(int numCourses, int[][] prerequisites) {
        return GraphUtils.findOrder(numCourses, prerequisites);
    }
}

public class leetcode210 {
    public static void main(String[] args) {
        Solution210 solution210 = new Solution210();

        int numCourses = 2;
        int[][] prerequisites = {{1, 0}};
        System.out.println(Arrays.toString(solution210.findOrder(numCourses, prerequisites)));

        int numCourses1 = 4;
        int[][] prerequisites1 = {{1, 0}, {2, 0}, {3, 1}, {3, 2}};
        System.out.println(Arrays.toString(solution210.findOrder(numCourses1, prerequisites1)));

        int numCourses2 = 1;
        int[][] prerequisites2 = {};
        System.out.println(Arrays.toString(solution210.findOrder(numCourses2, prerequisites2)));
    }
}
